﻿#ifndef NDD_PLUGIN_IMPLEMENT_H
#define NDD_PLUGIN_IMPLEMENT_H

#include <QWidget>
#include <QMenu>
#include <string>
#include "Version.h"
#include "Conversion.h"
#include "SettingPannel.h"
#include "ConversionPannel.h"
#include "MyQsciDoc.h"

class QsciScintilla;
class ConversionPlugin : public QWidget
{
private:
    Q_OBJECT

public:
    explicit ConversionPlugin(QWidget *parent, std::function<QsciScintilla* ()> func, QMenu* menu, QString pluginPath);
    virtual ~ConversionPlugin();

protected:
    void SetMenuActions(QMenu *menu);
    void SaveAs();

    QByteArray ToHex(const QByteArray &txt, bool fullText);
    QByteArray ToString(const QByteArray &txt, bool fullText);
    void ToHex();
    void ToString();

private:
    QWidget *currentWidget;
    SettingPannel setting;
    MyQsciDoc doc;
    ConversionPannel convertPanel;
};

#endif // NDD_PLUGIN_IMPLEMENT_H
